$OpenBSD: patch-Imakefile,v 1.11 2013/06/04 15:41:23 naddy Exp $
--- Imakefile.pat.orig	Mon Mar 30 11:53:05 2009
+++ Imakefile	Tue Jun  4 11:17:07 2013
@@ -68,15 +68,16 @@ XCOMM #define XAW3D1_5E
     XAW_SRC = w_menuentry.c SmeCascade.c SmeBSB.c SimpleMenu.c
     XAW_OBJ = w_menuentry.o SmeCascade.o SmeBSB.o SimpleMenu.o
 #   ifdef XAW3D
-	DUSEXAW3D = -DXAW3D
+    DUSEXAW3D = -DXAW3D
+    XAWLIB = -lXaw3d
 #   endif /* XAW3D */
 #endif /* XAW3D1_5E */
 
 XCOMM Redefine the following if your PNG library, zlib library and/or include file
 XCOMM are in different places
 
-PNGLIBDIR = $(USRLIBDIR)
-PNGINC = -I/usr/local/include
+PNGLIBDIR = ${LOCALBASE}/lib
+PNGINC = -I${LOCALBASE}/include
 ZLIBDIR = $(USRLIBDIR)
 
 XCOMM If don't want JPEG support, comment out the #define USEJPEG line
@@ -95,13 +96,13 @@ XCOMM You must have version 5b or newer of the jpeg li
 #define USEINSTALLEDJPEG
 
 #ifdef USEJPEG
-    #ifdef USEINSTALLEDJPEG
-	JPEGLIBDIR = /usr/local/lib
-	JPEGINC = -I/usr/include/X11
-    #else
-	JPEGLIBDIR = ../jpeg
-	JPEGINC = -I$(JPEGLIBDIR)
-    #endif /* USEINSTALLEDJPEG */
+#ifdef USEINSTALLEDJPEG
+JPEGLIBDIR = ${LOCALBASE}/lib
+JPEGINC = -I${LOCALBASE}/include
+#else
+JPEGLIBDIR = ../jpeg
+JPEGINC = -I$(JPEGLIBDIR)
+#endif /* USEINSTALLEDJPEG */
 #endif /* USEJPEG */
 
 XCOMM Uncomment the #define for USEXPM if you want to use the XPM
@@ -119,8 +120,8 @@ XCOMM Change XPMINC if necessary to point to the inclu
 #define USEXPM_ICON
 
 #ifdef USEXPM
-XPMLIBDIR = /usr/local/lib
-XPMINC = -I/usr/local/include/X11
+XPMLIBDIR = ${X11BASE}/lib
+XPMINC = -I${X11BASE}/include/X11
 #endif
 
 XCOMM Uncomment the following definiton if you want to use the small icons
@@ -154,14 +155,16 @@ XCOMM #define I18N
 
 XCOMM If using an input tablet uncomment the following
 
+#if BuildInputExt == YES
 TABLIB = $(XILIB)
 USETAB = -DUSE_TAB
+#endif
 
 XCOMM uncomment the following line if your compiler supports
 XCOMM inline functions. With the "INLINE" keyword, you should notice that
 XCOMM the display will be a bit faster in complex figures
 
-XCOMM USEINLINE = -DUSE_INLINE
+USEINLINE = -DUSE_INLINE
 
 XCOMM use (and change) the following if you want the multi-key data base file
 XCOMM somewhere other than the standard X11 library directory
@@ -177,7 +180,7 @@ XFIGDOCDIR = /usr/local/xfig/doc
 
 XCOMM MANDIR tells where the standard man pages should go (no need to change it
 XCOMM if you want the man pages installed in the standard place on your system
-MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
+XCOMM MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
 XCOMM MANDIR = /usr/local/xfig/man
 
 XCOMM If your system doesn't have strstr undefine the following definition
@@ -251,7 +254,7 @@ DEPLIBJPEG = $(JPEGLIBDIR)/libjpeg.a
 #endif /* USEJPEG */
 
 #ifdef I18N
-I18N_DEFS = -DI18N -DSETLOCALE
+I18N_DEFS = -DI18N
 I18N_SRC = w_i18n.c
 I18N_OBJ = w_i18n.o
 #endif
@@ -450,7 +453,7 @@ install.libs::
 	@if [ -d $(DESTDIR)$(OBJLIBDIR) ]; then set +x; \
 		else (set -x; $(MKDIRHIER) $(DESTDIR)$(OBJLIBDIR) ; set +x; ); fi
 	@if [ -d Libraries ]; then \
-		(cd Libraries ; tar cf - */. ) | ( cd $(DESTDIR)$(OBJLIBDIR) ; tar xf - ) ; \
+		(cd Libraries ; tar cf - [A-Z]* ) | ( cd $(DESTDIR)$(OBJLIBDIR) ; tar xf - ) ; \
 	else echo No Object Libraries to install ; \
 	fi;
 
